/*
 *  Copyright 2005 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.webapp.form.core;

import com.blandware.atleap.webapp.form.BaseForm;
import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>Form bean for form that contains two dates. For example, may be used to
 * implement filtering by date interval.</p>
 * <p><a href="TwoDatesForm.java.html"><i>View source</i></a></p>
 *
 * @author Roman Puchkovskiy <a href="mailto:roman.puchkovskiy@blandware.com">
 *         &lt;roman.puchkovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.1 $ $Date: 2006/06/03 11:53:51 $
 * @struts.form name="twoDatesForm"
 */
public class TwoDatesForm extends BaseForm {
    /**
     * First date
     */
    protected String date1;
    /**
     * Second date
     */
    protected String date2;

    /**
     * Returns first date.
     *
     * @return first date
     */
    public String getDate1() {
        return date1;
    }

    /**
     * Sets first date.
     *
     * @param date1 date to set
     */
    public void setDate1(String date1) {
        this.date1 = date1;
    }

    /**
     * Returns second date.
     *
     * @return second date
     */
    public String getDate2() {
        return date2;
    }

    /**
     * Sets second date.
     *
     * @param date2 date to set
     */
    public void setDate2(String date2) {
        this.date2 = date2;
    }

    /**
     * Resets all properties to their default values.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        date1 = null;
        date2 = null;
    }
}
